<template>
  <div class="firstpage">
    <Head />
    <div class="navBar">
      <div class="city">{{ city }}<van-icon name="arrow-down" /></div>
      <div class="video-tab">
        <li v-for="(item,index) in videoBar" :key="index">
          <router-link :to="item.url">{{item.title}}</router-link>
        </li>
        
        <!-- <router-link to="/cinema">影院</router-link>
        <router-link to="/shown">待映</router-link>
        <router-link to="/classic">经典电影</router-link> -->
      </div>
      
      <div class="serch"><van-icon name="search" /></div>
    </div>
        <router-view></router-view>
  </div>
</template>

<script>
import Head from "../../components/header";
export default {
  components: { Head },
  data() {
    return {
      ind: 0,
      city: "南京",
      videoBar:[
        {
          url:"/hotmovie",
          title:"热映"
        },
        {
          url:"/cinema",
          title:"影院"
        },
        {
          url:"/shown",
          title:"待映"
        },
        {
          url:"/classic",
          title:"经典电影"
        }
      ]
    };
  },
  methods: {
    tabClick(index) {
      this.ind = index;
    },
  },
};
</script>

<style lang="scss">
.firstpage {
  width: 100%;
  height: 100%;
  .header {
    width: 100%;
    height: 0.9rem;
    font-size: 18px;
    font-weight: 300;
    color: #fff;
    background: #e54847;
    display: flex;
    .title {
      width: 90%;
      height: 100%;

      p {
        width: 100%;
        height: 100%;
        margin-left: 5%;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
    .title-ico {
      width: 10%;
      height: 100%;
      font-size: 30px;
      font-weight: 300;
      display: flex;
      align-items: center;
      justify-content: center;
      .van-icon {
        width: 10px;
      }
    }
  }
  .navBar {
    width: 100%;
    height: 0.9rem;
    display: flex;
        border-bottom: 1px solid #e6e6e6;
    .city {
      width: 15%;
      height: 100%;
      font-size: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .video-tab {
      width: 70%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: space-around;
      font-size: 16px;
      
     
    }
    .serch {
      width: 15%;
      height: 100%;
      font-size: 25px;
      color: #e54847;
      display: flex;
      align-items: center;
      justify-content: center;
      .van-icon {
        font-weight: 600;
      }
    }
  }
}
.active {
  border-bottom: 2px solid #e54847;
  font-weight: 600;
 color: #333;
}
</style>